/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/database/SPCallLog.h,v 1.3 2003/11/21 12:39:24 itsme Exp $
 *
 *
 */


#ifndef __SPCALLLOG_H__

#include <windows.h>
#include "CeDatabase.h"

enum SPCallType {
    SPCALL_MISSED=4,
    SPCALL_OUTGOING=5,
    SPCALL_INCOMING=6,
    SPCALL_REJECTED=7,
};

class SPCallLogEntry {
public:
   char *name;
   char *number;
   FILETIME startTime;
   FILETIME endTime;
   SPCallType callType;
   char *keySignature;
};

class SPCallLog {
public:
    SPCallLog();
    ~SPCallLog();

    void Open();

    void AddEntry(const SPCallLogEntry &entry);
private:
        CeDatabase m_db;

    WCHAR *DatabaseName();
};

// database field id's
//   [ same field numbering used as in the original call-log.
enum DBSPCALLLOG_FIELDS {
    DBSPCALLLOG_START_FIELD=2,
    DBSPCALLLOG_END_FIELD=3,
    DBSPCALLLOG_CALLTYPE_FIELD=4,
    DBSPCALLLOG_NUMBER_FIELD=6,
    DBSPCALLLOG_NAME_FIELD=7,
    DBSPCALLLOG_KEYSIGNATURE_FIELD=11,
};

#define __SPCALLLOG_H__
#endif
